package com.example.musicwebcon.service.serviceInterface;

import com.example.musicwebcon.model.User;
import com.example.musicwebcon.model.dto.UserDTO;

import java.util.List;


public interface IUserService {
    /**
     * 插入用户
     *
     * @param user
     * @return
     */
    User add(UserDTO user);

    /**
     * 根据用户ID获取用户信息
     *
     * @param userId
     * @return
     */
    User get(String userId);


    /**
     * 修改用户
     *
     * @param user
     * @return
     */
    User edit(UserDTO user);

    /**
     * 删除用户
     *
     * @param userId
     */
    void delete(String userId);


    List<User> getUsersInAgeRange(Integer minAge, Integer maxAge);


    User getByName(String userName);

    List<User> getUsersByNickname(String nickname);

    User getByEmailAndPassword(String email, String password);
}
